import storage from 'store'
import { APP_PROJECT_ID } from '@/store/mutation-types'

const project = {
  state: {
    projectId: '',
    projectName: ''
  },

  mutations: {
    SET_PROJECT: (state, { projectId, projectName }) => {
      state.projectId = projectId
      state.projectName = projectName
      storage.set(APP_PROJECT_ID, projectId, 7 * 24 * 60 * 60 * 1000)
    }
  }
}

export default project
